<template>
  <f7-page>
    <f7-navbar title="教学用车申请表" back-link=""></f7-navbar>
    <f7-list>
      <f7-list-item title="名称" v-bind:after="item.title"></f7-list-item>
      <f7-list-item title="申请部门" v-bind:after="item.orgName"></f7-list-item>
      <f7-list-item title="填表时间" v-bind:after="item.creationDate"></f7-list-item>
      <f7-list-item title="申请时间" v-bind:after="item.updateDate"></f7-list-item>
      <f7-list-item title="用车事由" v-bind:after="item.reason"></f7-list-item>
      <f7-list-item title="乘车人数" v-bind:after="item.usageCount"></f7-list-item>
      <f7-list-item title="开始用车时间" v-bind:after="item.beginDate"></f7-list-item>
      <f7-list-item title="结束用车时间" v-bind:after="item.endDate"></f7-list-item>
      <f7-list-item title="用车起始地点" v-bind:after="item.address"></f7-list-item>
      <f7-list-item title="用车情况" v-bind:after="item.city ? '市内' : '市外'"></f7-list-item>
      <f7-list-item title="签批选项" v-bind:after="item.needTeachingUser ? '教务部' : '平台建设与管理中心'"></f7-list-item>
      <f7-list-item title="申请人" v-bind:after="item.createBy"></f7-list-item>
      <f7-list-item title="联系电话" v-bind:after="item.operatorPhone"></f7-list-item>
      <f7-list-item title="部门主管领导" v-bind:after="item.depManageUser"></f7-list-item>
      <template v-if="item.needTeachingUser">
        <f7-list-item title="教务部" v-bind:after="item.teachingUser"></f7-list-item>
      </template>
      <template v-else>
        <f7-list-item title="平台建设与管理中心" v-bind:after="item.manageCenterUser"></f7-list-item>
      </template>
      <f7-list-item title="学工部" v-bind:after="item.learningUser"></f7-list-item>
      <f7-list-item title="校务部" v-bind:after="item.schoolUser"></f7-list-item>
      <f7-list-item title="学校主管领导" v-bind:after="item.schoolLeader"></f7-list-item>
    </f7-list>
    <f7-block-title></f7-block-title>

  </f7-page>
</template>

<script>
    export default {
      name: "teachingCarApplyView",
      data () {
        return {
          item: {}
        }
      },
      created () {
        this.$f7ready((f7) => {
          let id = this.$f7route.params.id;
          let that = this;
          f7.request.setup({
            headers: {
              'AccessToken': sessionStorage.getItem('accessToken'),
              'JSESSIONID': sessionStorage.getItem('userToken')
            }
          });
          if (id !== undefined) {
            f7.request.json(that.GLOBAL.RequestAddress + '/camel/rest/teachingcarapplys/' + id, {}, function (result) {
              if (result.success === undefined) {
                that.item = result;
              }
            });
          }
        });
      }
    }
</script>

<style scoped>

</style>
